#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>
#include <string>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    setWindowTitle("这是标题");
   // QPushButton* btn=new QPushButton(this);
    QString string=windowTitle();
    qDebug()<<string;
    //QIcon icon("C:/fdd9a63e52e3e308ede085b9d29d4ec9.jpg");
    //setWindowIcon(icon);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{

    QRect rect1= this->geometry();
    QRect rect2=ui->pushButton->frameGeometry();
    qDebug()<<rect1;
    qDebug()<<rect2;
}
